// ==UserScript==
// @name           Wykop kolorowi plusujący
// @version        1.2
// @author         XcccX
// @description    Wykop kolorowi plusujący
// @include        http://*.wykop.pl/*
// @run-at         document-body
// @updateURL      https://wypok.googlecode.com/svn/colored.nicks.user.js
// @downloadURL      https://wypok.googlecode.com/svn/colored.nicks.user.js
// ==/UserScript==

var nightmode = wykop.params['settings']['night_mode'];
var color5 = (nightmode) ? "#FFFFFF" : "#000000";
var typeN = (nightmode) ? "nocnego" : "dziennego";

var css = 'body #site .grid-main .color-1 { color:#ff5917 !important }'
        + 'body #site .grid-main .color-2 { color:#BB0000 !important }'
        + 'body #site .grid-main .color-3 { color:#ff0000 !important }'
        + 'body #site .grid-main .color-4 { color:#999999 !important }'
        + 'body #site .grid-main .color-5 { color:'+ color5 +' !important }'
        + 'body #site .grid-main .color-6 { color:#367aa9 !important }'
        + 'body #site .grid-main .color-1001 { color:#999999 !important }'
        + 'body #site .grid-main .color-1002 { color:#999999 !important }'
        + 'body #site .grid-main .color-2001 { color:#3f6fa0 !important }'
        + 'body #site .grid-main .color-0 { color:#339933 !important }',
    
    head = document.head || document.getElementsByTagName('head')[0],
    style = document.createElement('style');



style.type = 'text/css';
if (style.styleSheet){
  style.styleSheet.cssText = css;
} else {
  style.appendChild(document.createTextNode(css));
}

head.appendChild(style);

console.log('+ Załadowano kolorowanie nicków dla trybu: ' + typeN);